#include "binadd.h"
//#include "binprmt.cpp"
//#define I (unsigned long)1

main () {
		CBinWord tmp4(4), tmp7(7),tmp28(28),tmp281(28) ;
		int
			wt4 = 3 ,
			wt7	= 4 ;
			int n40 = (1<<wt4)-1 ,
					n41 = n40 << (tmp4.n - wt4) ,
					n70 = (1<<wt7)-1 ,
					n71 = n70 << (tmp7.n - wt7) ;
		tmp4.num = n40 ;
		//cout << n40 << n41 << n70 << n71 ;
		//exit(0) ;
		// ofstream out("w8") ;
		CBinCode C(14, 28), D(14, 28) ;
		cin >> C ;
			D = C ;
		int wt_count = 3549 ;
		t_src* wt8 = new t_src[wt_count] ;
		D.convert() ;
		// cout << C << D ;

		//// extracting weight 12 /////////////
		CBinWord tmp(28, 0);
		t_len foo=0, cnt=0 ;

		for(t_cnt i=1; i<(I << C.k); i++) {
			foo=0; tmp.num=0;
			while(foo<C.n) {
				if(i>>foo &1)tmp.num^=C.row[foo].num ;
				foo++;
			}
			if ( tmp.wt()==12 ) {
				 wt8[cnt] = tmp.num ;
				 cnt++ ;
			 //	 out << tmp.num ;
			}
		}
		cout << "\ncnt = " << cnt << endl ;
		//////////////////////////////////////

		int counter=0 ;
		for (; tmp4.num <= n41 ; ) {
			 tmp7.num = n70 ;
			 for ( ; tmp7.num <= n71 ; ) {
			 		tmp28 = (tmp4^tmp7) ;
					tmp281 = (tmp7^tmp4) ;
					for ( cnt=0; cnt < wt_count; cnt++ )	{
						tmp.num = wt8[cnt] ;
						// tmp = tmp + tmp28 ;

						if ( (tmp+tmp28).wt() <= 2)	{
							cout << tmp+tmp28 << "\t4_7\n" ;
						}

						if ( (tmp+tmp281).wt() <= 2 )	{
							cout << tmp+tmp281 << "\t7_4\n" ;
						}
					}
					counter++ ;
					tmp7.next() ;
			 }
			 tmp4.next() ;
		} ;
		cout << "\ncount :\t" <<counter ;
		/*
		CBinCode C(13, 28) ;
		cin >> C ;
		C.convert() ;

		/*
		int foo,temp=0 ;
		CBinWord tmp(28) ;

	for(t_cnt i=1; i<((long)1<<C.k); i++)
	{
		foo=0;
		tmp.num=0;
		while(foo<C.n)
		{
			if(i>>foo &1)tmp.num^=C.row[foo].num;
			foo++;
		}
		if(tmp.wt()==12 && (D*tmp).num!=0) {
			temp++;
			cout << tmp << endl;
		} ;
	}
	cout << "count: " << temp ;

		//for (int i=0; i<13;i++ )
		//	cout << D*C.row[i] << endl;
		//cout << C << D;

		*/
    return 0 ;
}
